import request from '@/utils/request'
import {parseStrEmpty} from "@/utils/ruoyi";

// 查询客户资料列表
export function listCustomer(query) {
    return request({
        url: '/wms/customer/list',
        method: 'get',
        params: query
    })
}

// 查询客户资料详细
export function getCustomer(customerId) {
    return request({
        url: '/wms/customer/' + parseStrEmpty(customerId),
        method: 'get'
    })
}

// 新增客户资料
export function addCustomer(data) {
    return request({
        url: '/wms/customer',
        method: 'post',
        data: data
    })
}

// 修改客户资料
export function updateCustomer(data) {
    return request({
        url: '/wms/customer',
        method: 'put',
        data: data
    })
}

// 删除客户资料
export function delCustomer(customerId) {
    return request({
        url: '/wms/customer/' + customerId,
        method: 'delete'
    })
}
